{extend name="layout" /}
{block name="content"}
<div class="mui-content">
	<!--block tab切換-->
	<div class="tm-label-lgm tm-bg-white uk-margin-small-top">
		<div class="main-content">
			<div class="main-tab">
				<div id="segmentedControl" class="mui-segmented-control mui-segmented-control-itme3">
					<a class="mui-control-item tm-icon-btn mui-active" href="#item1">
						<div class="tm-label-item">
							<div class="tm-label">
								我的海报
							</div>
						</div>
					</a>
					<a class="mui-control-item tm-icon-btn" href="#item2">
						<div class="tm-label-item">
							<div class="tm-label">
								我的H5
							</div>
						</div>
					</a>
				</div>
			</div>
		</div>
	</div>
	<div class="main-tab-con tm-border-top">
		<!--切换1-->
		<div id="item1" class="mui-control-content mui-active">
			<div class="tm-label tm-bg-white">
				<div class="tm-flex-row">
					<div class="main-content">
						<div class="tm-flex-row share-grid">
							<ul class="uk-grid">
								{volist name=":get_model_func('Poster', 'list_data', ['userid'=>$_userid])" id="v"}
								<li class="uk-width-1-3">
									<div class="parent-relative">
										<img src="{$v.thumb}" alt="" />
										<div class="edit-group">
											<a href="javascript:" class="edit-group-item cocoAjax" ajax-url="{:url('v1/poster/delete')}" ajax-data="{ item_ids:{$v.id}}" ajax-callback="del_back">
												<img src="{$images_path}del-white.png" width="16" height="16"/>
											</a>
											<a href="{:url('edit_poster', ['id'=>$v.id])}" class="edit-group-item">
												<img src="{$images_path}ide-white.png" width="16" height="16"/>
											</a>
											<a href="Javascript:" class="edit-group-item appshare" ajaxurl="{:url('/v1/member_share/add')}" sharedata="{ shareurl:'{:APP_URL.'/index/index/poster/id/'.$v.id}', sharetitle:'{$v.title}', sharedesc:'{:str_cut($v.descrip, 100)}', sharethumb:'{:APP_URL.thumb($v.thumb, 80, 80)}'}" coco-callback="suc_share" typeid="5" contentid="{$v.id}">
												<img src="{$images_path}sharing-icon-white.png" width="16" height="16"/>
											</a>
										</div>
									</div>
								</li>
								{/volist}
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--切换1 end-->

		<!--切换2-->
		<div id="item2" class="mui-control-content">
			<div class="tm-label tm-bg-white">
				<div class="tm-flex-row">
					<div class="main-content">
						<div class="tm-flex-row share-grid">
							<ul class="uk-grid">
								<li class="uk-width-1-3">
									<a class="parent-relative" href="{:ban_refresh('/formwork1/index.html', 'blank')}">
										<img src="{$images_path}fenxiang-1.jpg" alt="" />
									</a>
								</li>
								<li class="uk-width-1-3">
									<a class="parent-relative" href="{:ban_refresh('/formwork2/index.html', 'blank')}">
										<img src="{$images_path}fenxiang-2.jpg" alt="" />
									</a>
								</li>
								<li class="uk-width-1-3">
									<div class="parent-relative">
										<img src="{$images_path}fenxiang-3.jpg" alt="" />
										<div class="edit-group">
											<a href="" class="edit-group-item">
												<img src="{$images_path}del-white.png" width="16" height="16"/>
											</a>
											<a href="" class="edit-group-item">
												<img src="{$images_path}ide-white.png" width="16" height="16"/>
											</a>
											<a href="" class="edit-group-item">
												<img src="{$images_path}sharing-icon-white.png" width="16" height="16"/>
											</a>
										</div>
									</div>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--切换2 end-->
	</div>
	<!--block tab切換 end-->
</div>
{/block}
{block name="script"}
<script type="text/javascript">
	function del_back(obj, data) {
		coco_msg('删除成功');
		$(obj).parent().parent().parent().remove();
	}
	function suc_back (obj, data) {
		var field = data.request.field;
		$.each(data.response, function(index, item) {
			if (index == field && item !== '') {
				$(obj).children('span:first-child').html(item);
			};
		});
	}
</script>
{/block}